package bookshelf;

public class Book {

	private final String title;
	
	public Book(final String title) {
		this.title = title;
	}
	
	public String getTitle() {
		return title;
	}
	
	@Override
	public boolean equals(final Object o) {
		if (!(o instanceof Book))
			return false;
		
		final Book book = (Book)o;
		return this.title.equals(book.title);
	}
	
	@Override
	public int hashCode() {
		return title.hashCode();
	}
	
	@Override
	public String toString() {
		return title;
	}
}
